package net.moonbiter.ebs.protocols.httpparams.tree.interp.types;

import net.moonbiter.OperationFailureException;
import net.moonbiter.ebs.NodeName;
import net.moonbiter.ebs.protocols.httpparams.tree.Tree;
import net.moonbiter.ebs.validation.ValidationException;

public abstract class SimpleTreeTypeInterpreter<T> extends
		TreeTypeInterpreterBase implements TreeTypeInterpreter<T> {

	public abstract T interpret(Tree tree, String strValue, NodeName[] namePortions)
			throws ValidationException, OperationFailureException;

	public boolean isComposed() {
		return false;
	}

	public final T interpret(Tree tree, NodeName[] namePortions)
			throws ValidationException, OperationFailureException {
		return interpret(tree, requireSingleStringLeafExistence(tree,
				namePortions),namePortions);
	}

}
